<?php $themeUri = get_template_directory_uri(); ?>
<?php $toolCid = 6; ?>
<div class="mail_building">
    <div class="container">
        <div class="row">

            <!-- items -->
            <?php
            $queryService = new WP_Query( array('cat' => $toolCid, 'posts_per_page' => 3));
            $cutOff = 200;
            ?>
        <?php if ( $queryService->have_posts() ) : ?>
            <?php while ( $queryService->have_posts() ) : $queryService->the_post(); ?>
            <div class="col-md-4">
                <div class="building">
                    <div class="ct">                        
                        <h3 class="title">
                            <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                        </h3>
                        <a href="<?php the_permalink(); ?>" class="thumb">
                            <?php the_post_thumbnail( 'service-thumb' ); ?>
                        </a>
                        <p class="lead">
                        <?php $cutOff = has_post_thumbnail( get_the_ID() ) ? 200 : 500; ?> 
                        <?php echo trim_text(get_the_excerpt(), $cutOff) ?>
                        </p>
                        <p class="view_all">
                            <a href="<?php the_permalink(); ?>" class="a_view_all"></a>
                        </p>                    
                    </div>
                </div>
            </div>
            <?php endwhile; ?>
        <?php endif; ?>
        <?php wp_reset_postdata(); ?>
            <!--/ items -->

        </div>
    </div>
</div>
